package site.zhangzhuo.learn_springboot.runner;

import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

//在SpringApplication.run运行完之后才会运行自己创建的实现类
//这里@Component注解起到生成bean并注入Spring容器的作用
// 并且自己的实现类通过@Order()注解控制顺序，数字越小越靠前。
@Component
@Order(2)
class Runner1 implements CommandLineRunner {
    @Override
    public void run(String... args) throws Exception {
        //System.out.println("class Runner1 implements CommandLineRunner......");
    }
}
